import service from "./index";

// 按需导出
// 页数
export function teacherpagecount(data) {
    return service({
        url: "/admin/teacher/page/count",
        method: "get",
        params: data
    })
}


// 列表
export function teacherpage(data, page) {
    return service({
        url: "/admin/teacher/page/" + page,
        method: "get",
        params: data
    })
}

// 选择框
export function departmentnames(data) {
    return service({
        url: "/admin/department/names",
        method: "get",
        params: data
    })
}

// 增加
export function adminteacher(data) {
    return service({
        url: "/admin/teacher",
        method: "post",
        data: data
    })
}

// 详情
export function adminteacherid(id) {
    return service({
        url: `/admin/teacher/ ` + id,
        method: "get",
    })
}

// 修改
export function teacherup(data) {
    return service({
        url: `/admin/teacher`,
        method: "put",
        data: data
    })
}

// 删除
export function teacherdel(id) {
    return service({
        url: `/admin/teacher/` + id,
        method: "DELETE",
    })
}